<ng-container [formGroup]="group">

    <fieldset [formGroupName]="model.id"
              [id]="id"
              [name]="model.name"
              [ngClass]="getClass('element', 'control')">

        <legend *ngIf="model.legend" [innerHTML]="model.legend"></legend>

        <dynamic-foundation-form-control *ngFor="let _model of model.group"
                                         [group]="control"
                                         [hidden]="_model.hidden"
                                         [layout]="formLayout"
                                         [model]="_model"
                                         [templates]="templates"
                                         [hostClass]="[getClass('element','children'), getClass('grid','children')]"
                                         (blur)="onBlur($event)"
                                         (change)="onChange($event)"
                                         (focus)="onFocus($event)"
                                         (bsEvent)="onCustomEvent($event, null, true)"></dynamic-foundation-form-control>
    </fieldset>

</ng-container>
